package com.zttek.photosShareProject.modules.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 图片表
 * </p>
 *
 * @author Y
 * @since 2017-09-19
 */
public class Image extends Model<Image> {

    private static final long serialVersionUID = 1L;

	@TableField("create_time")
	private Date createTime;
	@TableField("update_time")
	private Date updateTime;
	@TableField("delete_time")
	private Date deleteTime;
    /**
     * default 1, 0 for invalid
     */
	private Integer valid;
	@TableId(value="id", type= IdType.AUTO)
	private Long id;
	private String type;
	private String path;
	@TableField("thumb_path")
	private String thumbPath;
	@TableField("user_id")
	private Long userId;
	@TableField("md5_string")
	private String md5String;


	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public Date getDeleteTime() {
		return deleteTime;
	}

	public void setDeleteTime(Date deleteTime) {
		this.deleteTime = deleteTime;
	}

	public Integer getValid() {
		return valid;
	}

	public void setValid(Integer valid) {
		this.valid = valid;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	public String getThumbPath() {
		return thumbPath;
	}

	public void setThumbPath(String thumbPath) {
		this.thumbPath = thumbPath;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public String getMd5String() {
		return md5String;
	}

	public void setMd5String(String md5String) {
		this.md5String = md5String;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "Image{" +
			"createTime=" + createTime +
			", updateTime=" + updateTime +
			", deleteTime=" + deleteTime +
			", valid=" + valid +
			", id=" + id +
			", type=" + type +
			", path=" + path +
			", thumbPath=" + thumbPath +
			", userId=" + userId +
			", md5String=" + md5String +
			"}";
	}
}
